load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")

oncall("fbcode_entropy_wardens_folly")

fbcode_target(
    _kind = cpp_unittest,
    name = "baton_demo",
    srcs = ["synchronization/Baton.cpp"],
    headers = [],
    deps = [
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "dynamic_demo",
    srcs = ["dynamic.cpp"],
    headers = [],
    deps = [
        "//folly/json:dynamic",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "dynamic_converter_demo",
    srcs = ["DynamicConverter.cpp"],
    headers = [],
    deps = [
        "//folly/json:dynamic",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_binary,
    name = "executor_guide",
    srcs = ["ExecutorGuide.cpp"],
    headers = [],
    deps = [
        "//folly:executor",
        "//folly/coro:baton",
        "//folly/coro:task",
        "//folly/executors:manual_executor",
        "//folly/futures:core",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "file_demo",
    srcs = ["File.cpp"],
    headers = [],
    deps = [
        "//folly:file",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "format_demo",
    srcs = ["Format.cpp"],
    headers = [],
    deps = [
        "//folly:format",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "likely_demo",
    srcs = ["Likely.cpp"],
    headers = [],
    deps = [
        "//folly:likely",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "function_demo",
    srcs = ["Function.cpp"],
    headers = [],
    deps = [
        "//folly:function",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "map_util_demo",
    srcs = ["MapUtil.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "//folly:map_util",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "scope_guard2_demo",
    srcs = ["ScopeGuard2.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "//folly:scope_guard",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "scope_guard_demo",
    srcs = ["ScopeGuard.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "//folly:scope_guard",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "synchronized_demo",
    srcs = ["Synchronized.cpp"],
    headers = [],
    deps = [
        "//folly:synchronized",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "ipaddress_demo",
    srcs = ["ipaddress.cpp"],
    headers = [],
    deps = [
        "//folly:network_address",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "scoped_event_base_thread_demo",
    srcs = ["ScopedEventBaseThread.cpp"],
    headers = [],
    deps = [
        "//folly/io/async:scoped_event_base_thread",
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "scoped_event_base_thread2_demo",
    srcs = ["ScopedEventBaseThread2.cpp"],
    headers = [],
    deps = [
        "//folly:optional",
        "//folly/io/async:event_base_manager",
        "//folly/io/async:scoped_event_base_thread",
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
        "//folly/system:thread_name",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "cancellation_token_demo",
    srcs = ["CancellationToken.cpp"],
    headers = [],
    deps = [
        "//folly:cancellation_token",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "cancellation_source_demo",
    srcs = ["CancellationSource.cpp"],
    headers = [],
    deps = [
        "//folly:cancellation_token",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "cancellation_callback_demo",
    srcs = ["CancellationCallback.cpp"],
    headers = [],
    deps = [
        "//folly:cancellation_token",
        "//folly/portability:gtest",
    ],
)
